package com.ellecity06.common.ktx

import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.ellecity06.common.R

/**
 * @author ellecity06
 * @time 2024/10/26 11:22
 * @des
 */
/**
 * 设置SwipeRefreshLayout 的刷新头主题又颜色
 */
fun SwipeRefreshLayout.theme() {
    setColorSchemeResources(R.color.colorAccent)
    setProgressViewOffset(false,0,200)
}

fun SwipeRefreshLayout.finishRefresh() {
    if (isRefreshing) {
        isRefreshing = false
    }
}